package com.liao.myblog.service.impl;

import com.liao.myblog.dao.CatalogueMapper;
import com.liao.myblog.pojo.Catalogue;
import com.liao.myblog.service.CatalogueService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CatalogueServiceImpl implements CatalogueService {

    @Autowired
    private CatalogueMapper catalogueMapper;

    @Override
    public List<Catalogue> findCatalogueList() {
        return catalogueMapper.findCatalogueList();
    }

    @Override
    public Catalogue findCatalogueById(int id) {
        return catalogueMapper.findCatalogueById(id);
    }

    @Override
    public int updateCatalogue(Catalogue catalogue) {
        return catalogueMapper.updateCatalogue(catalogue);
    }

    @Override
    public int addCatalogue(Catalogue catalogue) {
        return catalogueMapper.addCatalogue(catalogue);
    }

    @Override
    public int findCatalogueCount() {
        return catalogueMapper.findCatalogueCount();
    }

    @Override
    public int deleteCatalogue(int[] catalogueIds) {
        return catalogueMapper.deleteCatalogue(catalogueIds);
    }
}
